package com.beadwallet.configclient;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;


@Slf4j
@EnableDiscoveryClient
@SpringBootApplication
public class ConfigClientApplication {

    @Bean
    @LoadBalanced
    RestTemplate restTemplate() {
        log.warn("==========config-clien 开启负载均衡==========");
        return new RestTemplate();
    }

    public static void main(String[] args) {
        log.warn("==========启动config-clien服务开始==========");
        SpringApplication.run(ConfigClientApplication.class, args);
        log.warn("==========启动config-clien服务完毕==========");

    }
}
